//
//  YSGHelpCenterFeedbackCell.swift
//  EyeVisionForPatients
//
//  Created by PMC on 2020/11/19.
//  Copyright © 2020 QDSG. All rights reserved.
//

import UIKit

class YSGHelpCenterFeedbackCell: UITableViewCell {
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        makeUI()
    }
    
    required init?(coder: NSCoder) {
        super.init(coder: coder)
        makeUI()
    }
    
    private func makeUI() {
        selectionStyle = .none
        backgroundColor = .clear
        contentView.backgroundColor = .clear
    }
    
    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)
        
        bgView.backgroundColor = selected ? .mainLight : .white
    }
    
    @IBOutlet private weak var bgView: UIView! {
        didSet {
            bgView.backgroundColor = .white
            bgView.layer.cornerRadius = 16.0
            bgView.clipsToBounds = true
        }
    }
    
}
